package com.qing.springcloud.dto.user;

import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author caozhipeng
 * @date 2025/7/9
 */
@AllArgsConstructor
@NoArgsConstructor
@Data // Lombok annotation to generate getters, setters, toString and other boilerplate code.
public class UserRegisterDTO {

    @NotNull(message = "用户名不能为空")
    @Size(min = 4, max = 20, message = "用户名长度应在4到20个字符之间")
    private String username;

    @NotNull(message = "密码不能为空")
    @Size(min = 6, message = "密码长度不能少于6个字符")
    private String password;

    @NotNull(message = "昵称不能为空")
    @Size(min = 2, max = 20, message = "昵称长度应在2到20个字符之间")
    private String nickname;

    private String phone;
}
